how to print all prime numbers in java